/*
 * @Date: 2025-06-18 18:40:21
 * @Auth: 463997479@qq.com
 * @LastEditors: 463997479@qq.com
 * @LastEditTime: 2025-09-26 17:49:14
 * @FilePath: \corpus\src\services\ant-design-pro\home\index.ts
 */
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
export async function getKnowledgeList(
  params: {
    // query
    /** 当前的页码 */
    current?: number;
    /** 页面的容量 */
    pageSize?: number;
  },
  options?: { [key: string]: any },
) {
  return request<API.RuleList>('/corpus/knowledge/getList', {
    method: 'POST',
    data: params,
    ...(options || {}),
  });
}
export async function addKnowledge(params: any, options?: { [key: string]: any }) {
  return request<API.ListItem>('/corpus/knowledge/addKnowledge', {
    method: 'POST',
    data: params,
    ...(options || {}),
  });
}
export async function editKnowledge(params: any, options?: { [key: string]: any }) {
  return request<API.ListItem>('/corpus/knowledge/editKnowledge', {
    method: 'POST',
    data: params,
    ...(options || {}),
  });
}
export async function editGovernanceKnowledge(params: any, options?: { [key: string]: any }) {
  return request<API.ListItem>('/corpus/governanceCorpus/editKnowledge', {
    method: 'POST',
    data: params,
    ...(options || {}),
  });
}

export async function getKnowledgeIndexList(params: {}, options?: { [key: string]: any }) {
  return request<API.RuleList>('/corpus/knowledge/index', {
    method: 'get',
    data: params,
    ...(options || {}),
  });
}

export async function getIntelligentAgent(params: any, options?: { [key: string]: any }) {
  return request<API.ListItem>('/corpus/knowledge/getIntelligentAgent', {
    method: 'get',
    params,
    ...(options || {}),
  });
}

export async function applyKnowledge(params: any, options?: { [key: string]: any }) {
  return request<API.ListItem>('/corpus/knowledgeSubmit/submit', {
    method: 'POST',
    data: params,
    ...(options || {}),
  });
}
